using System;
using System.Collections.Generic;
using System.Text;
using Watchdog.Bll;
using Watchdog.Engines;

namespace Watchdog {
    public class Context {

        internal Context () {
            scheduleengine = new ScheduleEngine ();
            clientsbyconnection = new Dictionary<IDispatchStatusHandler, TestUnit> ();
            clientsbytestunit = new Dictionary<TestUnit, IDispatchStatusHandler> ();
        }

        static Context current;
        public static Context Current {
            get {
                if (current == null)
                    current = new Context ();
                return current;
            }
            set { current = value; }
        }

        ScheduleEngine scheduleengine;
        public ScheduleEngine ScheduleEngine {
            get { return scheduleengine; }
        }

        Dictionary<IDispatchStatusHandler, TestUnit> clientsbyconnection;
        public Dictionary<IDispatchStatusHandler, TestUnit> ClientsByConnection {
            get { return clientsbyconnection; }
            set { clientsbyconnection = value; }
        }
        Dictionary<TestUnit, IDispatchStatusHandler> clientsbytestunit;
        public Dictionary<TestUnit, IDispatchStatusHandler> ClientsByTestUnit {
            get { return clientsbytestunit; }
            set { clientsbytestunit = value; }
        }

    }
}
